package com.example.demo.Controller;

import lombok.extern.slf4j.Slf4j;
import lombok.extern.slf4j.XSlf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created with IntelliJ IEDA.
 * Description:
 * User:86186
 * Date:2023-06-04
 * Time:23:27
 */
@Controller
@ResponseBody
@RequestMapping("art")
@Slf4j
public class ArticleController {
//    // 1.得到日志对象
//    private static final Logger logger = LoggerFactory.getLogger(ArticleController.class);



    @RequestMapping("/hi")
    private String sayHi(){
        log.trace("我是 slf4j 的 trace");
        log.debug("我是 slf4j 的 debug");
        log.info("我是 slf4j 的 info");
        return "Hi,Article";
    }
}
